class Engine < Application
  def index
    #provides :atom
    only_provides :html
    @title = "Petrinet Process Engine"
    @petrinets = PNEngine::Petrinet.find(:all)
    render :status => 200
  end
  
  def monitor
    render :status => 200
  end
  
  def measure
    log_entry = $EXECLOG[params[:case_id].to_i]
    t1 = log_entry.find{|e|params[:trans1].to_i == e[0].id}
    t2 = log_entry.find{|e|params[:trans2].to_i == e[0].id}
    status = 200
    return (t2[2]-t1[1]).to_s
  end
end